#include<iostream>
using namespace std;
const int N = 10010;
int a[N], b[N];
int primes[N], cnt;
bool st[N];
int n, m;
void get_primes(int n)
{
    for (int i = 2; i <= n; i++)
    {
        if (!st[i]) primes[cnt++] = i;
        for (int j = 0; primes[j] <= n / i; j++)
        {
            st[primes[j] * i] = true;
            if (i % primes[j] == 0) break;
        }
    }
}
void sub(int a[], int al, int b[], int bl)
{
    int t = 0;
    for (int i = 0; i < al; i++)
    {
        a[i] -= t + b[i];
        if (a[i] < 0) a[i] += 10, t = 1;
        else t = 0;
    }
}
void mul(int r[], int& len, int x)
{
    int t = 0;
    for (int i = 0; i < len; i++)
    {
        t += r[i] * x;
        r[i] = t % 10;
        t /= 10;
    }
    while (t)
    {
        r[len++] = t % 10;
        t /= 10;
    }
}
int get(int a, int p)
{
    int res = 0;
    while (a) res += a / p, a /= p;
    return res;
}
int C(int a, int b, int r[])
{
    r[0] = 1;
    int len = 1;
    for (int i = 0; i < cnt; i++)
    {
        int p = primes[i];
        int s = get(a, p) - get(b, p) - get(a - b, p);
        while (s--) mul(r, len, p);
    }
    return len;
}
int main()
{
    get_primes(N);
    cin >> n >> m;
    int al = C(m + n, n, a);
    int bl = C(m + n, m - 1, b);
    sub(a, al, b, bl);
    int k = al - 1;
    while (a[k] == 0 && k > 0) k--;
    while (k >= 0) cout << a[k--];
    return 0;
}